<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">

<head>

    <!--MyHeader-->
    <div th:include="common::MyHeader"></div>
    <!-- End of MyHeader -->
    <link th:href="@{/bootstraptable/bootstrap-table.min.css}" rel="stylesheet"/>

</head>

<body id="page-top">

<!-- Page Wrapper -->
<div id="wrapper">

    <!-- Sidebar -->
    <ul th:replace="common::Sidebar(${session.user.loginName},${session.role.roleName})"></ul>
    <!-- End of Sidebar -->

    <!-- Content Wrapper -->
    <div id="content-wrapper" class="d-flex flex-column">

        <!-- Main Content -->
        <div id="content">

            <!-- Topbar -->
            <div th:include="common::Topbar(${session.user.userName})"></div>
            <!-- End of Topbar -->

            <!-- Begin Page Content -->
            <div class="container-fluid">

                <!-- Page Heading -->
                <div class="d-sm-flex align-items-center justify-content-between mb-4">
                    <h1 class="h3 mb-0 text-gray-800">活动·历史记录</h1>
                </div>

                <!-- Content Row -->
                <div class="container card border-left-primary shadow h-100 py-2">
                    <div class="card-body">
                        <div class="row">
                            <div class="col-lg-3">
                                <div class="form-group">
                                    <!--                                <label class="sr-only"></label>-->
                                    <input type="text" class="form-control" id="activityName" placeholder="课程关键字">
                                </div>
                            </div>
                            <div class="col-lg-3">
                                <div class="form-group">
                                    <!--                                <label class="sr-only"></label>-->
                                    <input type="text" class="form-control" id="createByName" placeholder="活动创建人">
                                </div>
                            </div>
                            <div class="form-group">
                                <select class="form-control" id="statusId">
                                    <option value="" selected>活动状态：</option>
                                    <option th:value="0" th:text="可选"></option>
                                    <option th:value="1" th:text="已结束"></option>
                                </select>
                            </div>


                        </div>
                        <div class="row">
                            <div class="col-lg-3">
                                <div class="form-group">
                                    <input type="date" id="startDate" value="">
                                </div>
                            </div>
                            <div class="col-lg-1">
                                <span style="float: left">至</span>
                            </div>
                            <div class="col-lg-3">
                                <div class="form-group">
                                    <input type="date" id="endDate" value="">
                                </div>
                            </div>
                            <div class="col-lg-4">
                                <button class="btn btn-primary btn-sm" id="search_btn">查询</button>
                                <button class="btn btn-secondary  btn-sm" id="reset_btn">重置</button>
                            </div>
                        </div>
                    </div>
                </div>
                <div>
                    <div id="toolbar" class="row">
                        <form action="/course/exportCourse" method="post" shiro:lacksRole="student">
                            <input id="startInput" type="text" name="startDate" hidden="hidden" value="">
                            <input id="endInput" type="text" name="endDate" hidden="hidden" value="">
                            <input id="statusInput" type="text" name="status" hidden="hidden" value="">
                            <input id="courseInput" type="text" name="courseName" hidden="hidden" value="">
                            <button id="exportBtn" class="btn btn-success col" style="left: 20%"
                                    type="submit">全部导出
                            </button>
                        </form>
                    </div>
                    <table id="mytab" class="table table-hover"></table>
                </div>
            </div>
            <!-- /.container-fluid -->

        </div>
        <!-- End of Main Content -->

        <script th:src="@{/webjars/popper.js/1.11.1/dist/umd/popper.min.js}"></script>
        <!-- Footer -->
        <div th:include="common::Footer"></div>
        <!-- End of Footer -->
        <script th:src="@{/bootstraptable/bootstrap-table.min.js}"></script>
        <script th:src="@{/bootstraptable/bootstrap-table-zh-CN.min.js}"></script>
        <script th:src="@{/js/activity_history.js}"></script>
    </div>
    <!-- End of Content Wrapper -->

</div>
<!-- End of Page Wrapper -->

<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
    <i class="fas fa-angle-up"></i>
</a>

<!-- Logout Modal-->
<div th:include="common::LogoutModal"></div>


</body>

</html>
